package com.lh.entity.table;

import cn.hutool.core.date.DateTime;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@TableName("deadline_node_approval")
public class DeadlineNodeApproval {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField("main_id")
    private Integer mainId;

    @TableField("rectification_id")
    private Integer rectificationId;

    @TableField("deadline")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date deadline;

    @TableField("name")
    private String name;

    @TableField("content")
    private String content;

    @TableField("description")
    private String description;

    @TableField("sort")
    private Integer sort;

    @TableField("state")
    private String state;

    @TableField("type_name")
    private String typeName;

    @TableField("create_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @TableField(value = "progress", updateStrategy = FieldStrategy.IGNORED)
    private String progress;


    @TableField("remark")
    private String remark;

    @TableField("update_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    @TableField(value = "end_time", updateStrategy = FieldStrategy.IGNORED)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date endTime;

    @TableField("is_end")
    private String isEnd;

    @TableField("department_name")
    private String departmentName;

    @TableField("real_department")
    private String realDepartment;

    @TableField(value = "deadline_type", updateStrategy = FieldStrategy.IGNORED)
    private String deadlineType;

    //耗时
    @TableField(value = "duration", updateStrategy = FieldStrategy.IGNORED)
    private Integer duration;

    /**
     * 预警级别（0绿色、1黄色、2红色）
     */
    @TableField("warn_level")
    private String warnLevel;

}
